package com.ambimmort.shj.action.device.ud;

import com.ambimmort.shj.service.device.UdDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by zyt on 2015/7/30.
 */

@Controller("/action/UpdateUddevice.do")
public class UpdateUddevice {
    @Autowired
    private UdDeviceService udDeviceService;

    @RequestMapping("/action/UpdateUddevice.do")
    @ResponseBody

    public boolean action_device(HttpServletRequest request,@RequestParam("old_ip") String old_ip, @RequestParam("old_port")String old_port, @RequestParam("ip")String ip, @RequestParam("port")String port, @RequestParam("isRun")String isRun, @RequestParam("desc")String desc) {
        return udDeviceService.updateUddeviceDevice( old_ip, old_port,  ip,  port,  isRun,  desc);
    }
}